import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/styles/index.scss'
import 'element-plus/dist/index.css'

import SvgIcon from '@/icons' // 引入svg
import './router/permission' // 引入路由守卫
import i18n from '@/i18n' // 引入i18n的配置

import * as ElIcons from '@element-plus/icons-vue'

const app = createApp(App)

// 全局组件注册: element plus中的图标
for (const iconName in ElIcons) {
  app.component(iconName, ElIcons[iconName])
}

SvgIcon(app) // 对svg进行组件注册
app.use(store).use(router).use(i18n).mount('#app')
